package com.chen;

import com.chen.client.RpcCli;
import com.chen.dto.User;
import com.chen.service.UserService;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class RpcClientApplication {
    public static void main(String[] args) {
        UserService userService = RpcCli.create(UserService.class,"http://localhost:8080/");
        User user = userService.findUserById(1);
        System.out.println("find user id=1 from server:"+ user.getName());
    }


}
